using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsServerTools._AnalyzePatterns
{
    /// <summary>
    /// <para>Find Hot Spots</para>
    /// <para>Given a set of features, identifies statistically significant hot spots and cold spots using the Getis-Ord Gi* statistic.</para>
    /// <para>给定一组特征，使用 Getis-Ord Gi* 统计量识别具有统计显著性的热点和冷点。</para>
    /// </summary>    
    [DisplayName("Find Hot Spots")]
    public class FindHotSpots : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FindHotSpots()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_point_layer">
        /// <para>Point Layer</para>
        /// <para>The point feature class for which hot spot analysis will be performed.</para>
        /// <para>将对其执行热点分析的点要素类。</para>
        /// </param>
        /// <param name="_output_name">
        /// <para>Output Name</para>
        /// <para>The name of the output layer with the z-score and p-value results.</para>
        /// <para>包含 z 分数和 p 值结果的输出图层的名称。</para>
        /// </param>
        public FindHotSpots(object _point_layer, object _output_name)
        {
            this._point_layer = _point_layer;
            this._output_name = _output_name;
        }
        public override string ToolboxName => "GeoAnalytics Server Tools";

        public override string ToolName => "Find Hot Spots";

        public override string CallName => "geoanalytics.FindHotSpots";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_point_layer, _output_name, _bin_size, _neighborhood_size, _time_step_interval, _time_step_alignment.GetGPValue(), _time_step_reference, _output, _data_store.GetGPValue()];

        /// <summary>
        /// <para>Point Layer</para>
        /// <para>The point feature class for which hot spot analysis will be performed.</para>
        /// <para>将对其执行热点分析的点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _point_layer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output layer with the z-score and p-value results.</para>
        /// <para>包含 z 分数和 p 值结果的输出图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_name { get; set; }


        /// <summary>
        /// <para>Bin Size</para>
        /// <para>The distance interval that represents the bin size and units into which the Point Layer will be aggregated. The distance interval must be a linear unit.</para>
        /// <para>表示点图层将聚合到的图格大小和单位的距离间隔。距离间隔必须是线性单位。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </summary>
        [DisplayName("Bin Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _bin_size { get; set; } = null;


        /// <summary>
        /// <para>Neighborhood Size</para>
        /// <para>The spatial extent of the analysis neighborhood. This value determines which features are analyzed together to assess local clustering.</para>
        /// <para>分析邻域的空间范围。此值确定将哪些要素一起分析以评估局部聚类。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </summary>
        [DisplayName("Neighborhood Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _neighborhood_size { get; set; } = null;


        /// <summary>
        /// <para>Time Step Interval</para>
        /// <para>The interval that will be used for the time step. This parameter is only used if time is enabled for Point Layer.</para>
        /// <para>将用于时间步长的间隔。仅当为点层启用时间时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_interval { get; set; } = null;


        /// <summary>
        /// <para>Time Step Alignment</para>
        /// <para><xdoc>
        ///   <para>Specifies how time steps will be aligned. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        ///   <bulletList>
        ///     <bullet_item>End time—Time steps will align to the last time event and aggregate back in time.</bullet_item><para/>
        ///     <bullet_item>Start time—Time steps will align to the first time event and aggregate forward in time. This is the default.</bullet_item><para/>
        ///     <bullet_item>Reference time—Time steps will align to a specified date or time. If all points in the input features have a time stamp larger than the specified reference time (or it falls exactly on the start time of the input features), the time-step interval will begin with that reference time and aggregate forward in time (as occurs with the Start time alignment). If all points in the input features have a time stamp smaller than the specified reference time (or it falls exactly on the end time of the input features), the time-step interval will end with that reference time and aggregate backward in time (as occurs with the End time alignment). If the specified reference time is in the middle of the time extent of the data, a time-step interval will be created ending with the reference time provided (as occurs with the End time alignment); additional intervals will be created both before and after the reference time until the full time extent of the data is covered.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何对齐时间步长。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        ///   <bulletList>
        ///     <bullet_item>结束时间 - 时间步长将与上次时间事件对齐，并按时间聚合回程。</bullet_item><para/>
        ///     <bullet_item>开始时间 - 时间步长将与首次时间事件对齐，并在时间上向前聚合。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>参考时间 - 时间步长将与指定日期或时间对齐。如果输入要素中所有点的时间戳都大于指定的参考时间（或者正好落在输入要素的开始时间上），则时间步长间隔将从该参考时间开始，并在时间上向前聚合（与开始时间对齐方式相同）。如果输入要素中所有点的时间戳都小于指定的参考时间（或者正好落在输入要素的结束时间），则时间步长间隔将以该参考时间结束，并在时间上向后聚合（与结束时间对齐方式相同）。如果指定的参考时间位于数据时间范围的中间，则将创建一个以提供的参考时间结尾的时间步长间隔（与结束时间对齐方式一样）;将在参考时间之前和之后创建其他间隔，直到覆盖数据的完整时间范围。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Alignment")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_step_alignment_value _time_step_alignment { get; set; } = _time_step_alignment_value._START_TIME;

        public enum _time_step_alignment_value
        {
            /// <summary>
            /// <para>Start time</para>
            /// <para>Start time—Time steps will align to the first time event and aggregate forward in time. This is the default.</para>
            /// <para>开始时间 - 时间步长将与首次时间事件对齐，并在时间上向前聚合。这是默认设置。</para>
            /// </summary>
            [Description("Start time")]
            [GPEnumValue("START_TIME")]
            _START_TIME,

            /// <summary>
            /// <para>End time</para>
            /// <para>End time—Time steps will align to the last time event and aggregate back in time.</para>
            /// <para>结束时间 - 时间步长将与上次时间事件对齐，并按时间聚合回程。</para>
            /// </summary>
            [Description("End time")]
            [GPEnumValue("END_TIME")]
            _END_TIME,

            /// <summary>
            /// <para>Reference time</para>
            /// <para>Reference time—Time steps will align to a specified date or time. If all points in the input features have a time stamp larger than the specified reference time (or it falls exactly on the start time of the input features), the time-step interval will begin with that reference time and aggregate forward in time (as occurs with the Start time alignment). If all points in the input features have a time stamp smaller than the specified reference time (or it falls exactly on the end time of the input features), the time-step interval will end with that reference time and aggregate backward in time (as occurs with the End time alignment). If the specified reference time is in the middle of the time extent of the data, a time-step interval will be created ending with the reference time provided (as occurs with the End time alignment); additional intervals will be created both before and after the reference time until the full time extent of the data is covered.</para>
            /// <para>参考时间 - 时间步长将与指定日期或时间对齐。如果输入要素中所有点的时间戳都大于指定的参考时间（或者正好落在输入要素的开始时间上），则时间步长间隔将从该参考时间开始，并在时间上向前聚合（与开始时间对齐方式相同）。如果输入要素中所有点的时间戳都小于指定的参考时间（或者正好落在输入要素的结束时间），则时间步长间隔将以该参考时间结束，并在时间上向后聚合（与结束时间对齐方式相同）。如果指定的参考时间位于数据时间范围的中间，则将创建一个以提供的参考时间结尾的时间步长间隔（与结束时间对齐方式一样）;将在参考时间之前和之后创建其他间隔，直到覆盖数据的完整时间范围。</para>
            /// </summary>
            [Description("Reference time")]
            [GPEnumValue("REFERENCE_TIME")]
            _REFERENCE_TIME,

        }

        /// <summary>
        /// <para>Time Step Reference</para>
        /// <para>The time that will be used to align the time steps and time intervals. This parameter is only used if time is enabled for Point Layer.</para>
        /// <para>将用于对齐时间步长和时间间隔的时间。仅当为点层启用时间时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Step Reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_reference { get; set; } = null;


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        /// <summary>
        /// <para>Data Store</para>
        /// <para><xdoc>
        ///   <para>Specifies the ArcGIS Data Store where the output will be saved. The default is Spatiotemporal big data store. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.</para>
        ///   <bulletList>
        ///     <bullet_item>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</bullet_item><para/>
        ///     <bullet_item>Relational data store—Output will be stored in a relational data store.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将保存输出的 ArcGIS Data Store。默认值为 Spatiotemporal 大数据存储。存储在时空大数据存储中的所有结果都将存储在 WGS84 中。存储在关系数据存储中的结果将保留其坐标系。</para>
        ///   <bulletList>
        ///     <bullet_item>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>关系数据存储 - 输出将存储在关系数据存储中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Store")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_store_value _data_store { get; set; } = _data_store_value._SPATIOTEMPORAL_DATA_STORE;

        public enum _data_store_value
        {
            /// <summary>
            /// <para>Spatiotemporal big data store</para>
            /// <para>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</para>
            /// <para>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</para>
            /// </summary>
            [Description("Spatiotemporal big data store")]
            [GPEnumValue("SPATIOTEMPORAL_DATA_STORE")]
            _SPATIOTEMPORAL_DATA_STORE,

            /// <summary>
            /// <para>Relational data store</para>
            /// <para>Relational data store—Output will be stored in a relational data store.</para>
            /// <para>关系数据存储 - 输出将存储在关系数据存储中。</para>
            /// </summary>
            [Description("Relational data store")]
            [GPEnumValue("RELATIONAL_DATA_STORE")]
            _RELATIONAL_DATA_STORE,

        }

        public FindHotSpots SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}